]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: make shellInfo private
authorRay Strode <rstrode@redhat.com>
Sun, 28 Aug 2011 14:07:44 +0000 (10:07 -0400)
committerRay Strode <rstrode@redhat.com>
Sun, 28 Aug 2011 16:29:41 +0000 (12:29 -0400)
This commit forwards the shellInfo setMessage method
to the overview itself and makes shellInfo private.

https://bugzilla.gnome.org/show_bug.cgi?id=657082

js/ui/appFavorites.js
js/ui/overview.js
js/ui/placeDisplay.js

index d4f74553e2c44da15d985f6b8d1b4abada910051..bbb89141517287d7be224c7673e351ed4d459373 100644 (file)
@@ -86,7 +86,7 @@ AppFavorites.prototype = {
 
         let app = Shell.AppSystem.get_default().lookup_app(appId);
 
-        Main.overview.shellInfo.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
+        Main.overview.setMessage(_("%s has been added to your favorites.").format(app.get_name()), Lang.bind(this, function () {
             this._removeFavorite(appId);
         }));
     },
@@ -117,8 +117,8 @@ AppFavorites.prototype = {
         if (!this._removeFavorite(appId))
             return;
 
-        Main.overview.shellInfo.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
-                                         Lang.bind(this, function () {
+        Main.overview.setMessage(_("%s has been removed from your favorites.").format(app.get_name()),
+                                 Lang.bind(this, function () {
             this._addFavorite(appId, pos);
         }));
     }
index 4cba62a10c4c807a139be6f87647bd24533b1e1e..5326ec5f3853de49144e0b3282d8c2b48170d170 100644 (file)
@@ -175,7 +175,7 @@ Overview.prototype = {
     // signal handlers and so forth. So we create them after
     // construction in this init() method.
     init: function() {
-        this.shellInfo = new ShellInfo();
+        this._shellInfo = new ShellInfo();
 
         this._viewSelector = new ViewSelector.ViewSelector();
         this._group.add_actor(this._viewSelector.actor);
@@ -211,6 +211,10 @@ Overview.prototype = {
         this._relayout();
     },
 
+    setMessage: function(text, undoCallback, undoLabel) {
+        this._shellInfo.setMessage(text, undoCallback, undoLabel);
+    },
+
     _onDragBegin: function() {
         DND.addDragMonitor(this._dragMonitor);
         // Remember the workspace we started from
index edfef06a24eaecf8095535299f5248574758acf3..28f27f8dbd529c0bfcb13edc5bfc596f67531f9b 100644 (file)
@@ -118,9 +118,9 @@ PlaceDeviceInfo.prototype = {
                 this._mount.unmount_finish(res);
         } catch (e) {
             let message = _("Failed to unmount '%s'").format(o.get_name());
-            Main.overview.shellInfo.setMessage(message,
-                                             Lang.bind(this, this.remove),
-                                             _("Retry"));
+            Main.overview.setMessage(message,
+                                     Lang.bind(this, this.remove),
+                                     _("Retry"));
         }
     }
 };